package com.gzs.learn.springcloud.controller;

import com.gzs.learn.springcloud.dto.EmptyDto;
import lombok.RequiredArgsConstructor;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("config-info")
@RequiredArgsConstructor
public class ConfigInfoController {

    private final MappingJackson2HttpMessageConverter mappingJackson2HttpMessageConverter;
    // private final RedisTemplate<String, Object> redisTemplate;

    @GetMapping("jackson")
    public Object getJacksonConfig() {
        return mappingJackson2HttpMessageConverter.getObjectMapper();
    }

    @GetMapping("empty-dto")
    public Object getEmptyDto() {
        return new EmptyDto();
    }


}
